{extend name="../../admin/view/main"}

{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white">
    <ul class="layui-tab-title">
        {foreach ['index'=>'全部数据'] as $k=>$v}
        {if isset($type) and $type eq $k}
        <li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}</li>
        {else}
        <li data-open="{:url('index')}?type={$k}">{$v}</li>
        {/if}{/foreach}
    </ul>
    <div class="layui-tab-content">
        {include file='integral_record_controller/index_search'}
        <table class="layui-table margin-top-10" lay-skin="line">
            {notempty name='list'}
            <thead>
            <tr>
                <th class='text-left nowrap'>应用</th>
                <th class='text-left nowrap'>所属代理</th>
                <th class='text-left nowrap'>积分类型</th>
                <th class='text-left nowrap'>积分数量</th>
                <th class='text-left nowrap'>积分余额</th>
                <th class='text-left nowrap'>操作人</th>
                <th class='text-left nowrap'>备注</th>
                <th class='text-left nowrap'>创建时间</th>
            </tr>
            </thead>
            {/notempty}
            <tbody>
            {foreach $list as $key=>$vo}
            <tr>
                <td class='nowrap'>
                    {foreach $apps as $s}{eq name='vo.app_id' value='$s.app_id'}{$s.app_name}{/eq}{/foreach}
                </td>
                <td class='nowrap'>
                    {foreach $proxys as $s}{eq name='vo.uuid' value='$s.id'}{$s.user_nickname}{/eq}{/foreach}
                </td>
                <td class="nowrap">
                    {eq name='$vo.integral_type' value='1'}收入{/eq}
                    {eq name='$vo.integral_type' value='2'}支出{/eq}
                </td>
                <td class='nowrap'>{$vo.integral_num|default='--'}</td>
                <td class='nowrap'>{$vo.integral_balance|default='--'}</td>
                <td class='nowrap'>
                    {foreach $proxys as $s}{eq name='vo.create_uuid' value='$s.id'}{$s.user_nickname}{/eq}{/foreach}
                </td>
                <td class='nowrap'>{$vo.remarks|default='--'}</td>
                <td class='nowrap'>{$vo.create_time|default='--'}</td>
            </tr>
            {/foreach}
            </tbody>
        </table>
        {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
    </div>
</div>

{/block}